import numpy as np

# 环形队列
class SqQueue:
    queue=[]
    maxQueue=0
    front=-1
    rear=-1
    def __init__(self):
        super().__init__()

    def initQueue(self,size=5):
        self.maxQueue=size
    def destroyQueue(self):
        self.queue=[]
    def queueEmpty(self):
        return self.front==self.rear
    def enQueue(self,data):
        if self.rear==self.maxQueue-1:
            return False
        self.rear+=1
        self.queue.append(data)
    def deQueue(self):
        if self.queueEmpty():
            return None
        else:
            self.front+=1
            return self.queue[self.front]

def test():
    queue1=SqQueue()
    queue1.initQueue()
    for i in range(1,10):
        queue1.enQueue(i)
    data=queue1.deQueue()
    while data!=None:
        print('data===',data)
        data=queue1.deQueue()

    for i in range(1,10):
        queue1.enQueue(10-i)
    data=queue1.deQueue()
    queue1.enQueue(50)
    data=queue1.deQueue()
    while data!=None:
        print('data===',data)
        data=queue1.deQueue()